package com.liujit.pay.wx.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @description: 支付接口
 * @author: liujun
 * @create: 2021-02-19 15:24
 */
@Getter
@AllArgsConstructor
public enum PayApi {

    /**
     * JSAPI支付/小程序支付-统一下单
     */
    JSAPI_ORDER("/v3/pay/transactions/jsapi"),

    /**
     * APP支付-统一下单
     */
    APP_ORDER("/v3/pay/transactions/app"),

    /**
     * H5支付-统一下单
     */
    H5_ORDER("/v3/pay/transactions/h5"),

    /**
     * Native支付-统一下单
     */
    NATIVE_ORDER("/v3/pay/transactions/native"),

    /**
     * 微信支付订单号查询
     */
    QUERY_ORDER_WITH_ID("/v3/pay/transactions/id/%s"),

    /**
     * 商户订单号查询
     */
    QUERY_ORDER_WITH_NO("/v3/pay/transactions/out-trade-no/%s"),

    /**
     * 关闭订单
     */
    CLOSE_ORDER("/v3/pay/transactions/out-trade-no/%s/close"),

    /**
     * 申请退款
     */
    REFUNDS("/v3/refund/domestic/refunds"),

    /**
     * 查询单笔退款
     */
    REFUNDS_QUERY("/v3/refund/domestic/refunds/%s");

    /**
     * api地址
     */
    private String api;
}
